

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>The buttons module &mdash; pysiriproxy v0.0.7 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.0.7',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="pysiriproxy v0.0.7 documentation" href="../index.html" />
    <link rel="up" title="The objects module" href="mod_pysiriproxy_objects.html" />
    <link rel="next" title="The dataObjects module" href="pysiriproxy_objects_dataObjects.html" />
    <link rel="prev" title="The factory module" href="pysiriproxy_objects_factory.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pysiriproxy_objects_dataObjects.html" title="The dataObjects module"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="pysiriproxy_objects_factory.html" title="The factory module"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">pysiriproxy v0.0.7 documentation</a> &raquo;</li>
          <li><a href="mod_pysiriproxy.html" >The pysiriproxy module</a> &raquo;</li>
          <li><a href="mod_pysiriproxy_objects.html" accesskey="U">The objects module</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-pysiriproxy.objects.buttons">
<span id="the-buttons-module"></span><h1>The buttons module<a class="headerlink" href="#module-pysiriproxy.objects.buttons" title="Permalink to this headline">¶</a></h1>
<p>The buttons module contains classes pertaining to creating objects which
can be sent to the iPhone or Apple&#8217;s web server which pertain to creating
buttons on the iPhone.</p>
<div class="section" id="the-custom-class">
<h2>The _Custom class<a class="headerlink" href="#the-custom-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-32df098c7adbf011528028abca8048bd14e16059.png" alt="Inheritance diagram of pysiriproxy.objects.buttons._Custom" usemap="#inheritance08d9fcf4a1" class="inheritance"/>
<map id="inheritance08d9fcf4a1" name="inheritance08d9fcf4a1">
<area shape="rect" href="#pysiriproxy.objects.buttons._Button" title="pysiriproxy.objects.buttons._Button" alt="" coords="23,84,265,111"/>
<area shape="rect" href="#pysiriproxy.objects.buttons._Custom" title="pysiriproxy.objects.buttons._Custom" alt="" coords="19,161,269,188"/>
<area shape="rect" href="pysiriproxy_objects_baseObject.html#pysiriproxy.objects.baseObject.SiriObject" title="pysiriproxy.objects.baseObject.SiriObject" alt="" coords="5,7,283,33"/>
</map>
</p>
<dl class="class">
<dt id="pysiriproxy.objects.buttons._Custom">
<em class="property">class </em><tt class="descclassname">pysiriproxy.objects.buttons.</tt><tt class="descname">_Custom</tt><big>(</big><em>buttonText</em>, <em>command</em><big>)</big><a class="reference internal" href="../_modules/pysiriproxy/objects/buttons.html#_Custom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pysiriproxy.objects.buttons._Custom" title="Permalink to this definition">¶</a></dt>
<dd><p>The _Custom class creates a button that has the iPhone send a
custom command to the event that it is pressed.</p>
</dd></dl>

</div>
<div class="section" id="the-websearchbutton-class">
<h2>The _WebSearchButton class<a class="headerlink" href="#the-websearchbutton-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-9031d90a6e8a60e8b0928d48260894118025cb43.png" alt="Inheritance diagram of pysiriproxy.objects.buttons._WebSearchButton" usemap="#inheritancee7fe702db0" class="inheritance"/>
<map id="inheritancee7fe702db0" name="inheritancee7fe702db0">
<area shape="rect" href="#pysiriproxy.objects.buttons._Button" title="pysiriproxy.objects.buttons._Button" alt="" coords="41,84,284,111"/>
<area shape="rect" href="#pysiriproxy.objects.buttons._WebSearchButton" title="pysiriproxy.objects.buttons._WebSearchButton" alt="" coords="5,161,320,188"/>
<area shape="rect" href="pysiriproxy_objects_baseObject.html#pysiriproxy.objects.baseObject.SiriObject" title="pysiriproxy.objects.baseObject.SiriObject" alt="" coords="24,7,301,33"/>
</map>
</p>
<dl class="class">
<dt id="pysiriproxy.objects.buttons._WebSearchButton">
<em class="property">class </em><tt class="descclassname">pysiriproxy.objects.buttons.</tt><tt class="descname">_WebSearchButton</tt><big>(</big><em>buttonText</em>, <em>query</em><big>)</big><a class="reference internal" href="../_modules/pysiriproxy/objects/buttons.html#_WebSearchButton"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pysiriproxy.objects.buttons._WebSearchButton" title="Permalink to this definition">¶</a></dt>
<dd><p>The _WebSearchButton creates a button on the iPhone Siri view which will
perform a web search for a specific query in the event that the button is
pressed.</p>
</dd></dl>

</div>
<div class="section" id="the-siriobject-class">
<h2>The SiriObject class<a class="headerlink" href="#the-siriobject-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-cea1b6e4fe105bbf4201dd007cd528b47e0c82bb.png" alt="Inheritance diagram of pysiriproxy.objects.buttons.SiriObject" usemap="#inheritance6af41246f1" class="inheritance"/>
<map id="inheritance6af41246f1" name="inheritance6af41246f1">
<area shape="rect" href="pysiriproxy_objects_baseObject.html#pysiriproxy.objects.baseObject.SiriObject" title="pysiriproxy.objects.baseObject.SiriObject" alt="" coords="5,7,283,33"/>
</map>
</p>
<dl class="class">
<dt id="pysiriproxy.objects.buttons.SiriObject">
<em class="property">class </em><tt class="descclassname">pysiriproxy.objects.buttons.</tt><tt class="descname">SiriObject</tt><big>(</big><em>className</em>, <em>group</em><big>)</big><a class="headerlink" href="#pysiriproxy.objects.buttons.SiriObject" title="Permalink to this definition">¶</a></dt>
<dd><p>The SiriObject class encapsulates the base functionality for all
object being sent to the iPhone or to Apple&#8217;s web server.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This class is meant to be subclassed to provide the
implementation for a specific object.</p>
</div>
<dl class="attribute">
<dt id="pysiriproxy.objects.buttons.SiriObject.ProtocolVersion">
<tt class="descname">ProtocolVersion</tt><a class="headerlink" href="#pysiriproxy.objects.buttons.SiriObject.ProtocolVersion" title="Permalink to this definition">¶</a></dt>
<dd><p>The identifier which indicates the version of the protocol.</p>
</dd></dl>

<dl class="classmethod">
<dt id="pysiriproxy.objects.buttons.SiriObject.isArgumentList">
<em class="property">classmethod </em><tt class="descname">isArgumentList</tt><big>(</big><em>obj</em><big>)</big><a class="headerlink" href="#pysiriproxy.objects.buttons.SiriObject.isArgumentList" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine if the given object is a list of arguments, or not.</p>
<ul class="simple">
<li>obj &#8211; The object</li>
</ul>
</dd></dl>

<dl class="classmethod">
<dt id="pysiriproxy.objects.buttons.SiriObject.isSiriObject">
<em class="property">classmethod </em><tt class="descname">isSiriObject</tt><big>(</big><em>obj</em><big>)</big><a class="headerlink" href="#pysiriproxy.objects.buttons.SiriObject.isSiriObject" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine if the given object is a SiriObject, or not.</p>
<ul class="simple">
<li>obj &#8211; The object</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pysiriproxy.objects.buttons.SiriObject.makeRoot">
<tt class="descname">makeRoot</tt><big>(</big><em>refId=None</em>, <em>aceId=None</em><big>)</big><a class="headerlink" href="#pysiriproxy.objects.buttons.SiriObject.makeRoot" title="Permalink to this definition">¶</a></dt>
<dd><p>Make the SiriObject the root object.</p>
<ul class="simple">
<li>refId &#8211; The refId for this object</li>
<li>aceId &#8211; The aceId for this object</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pysiriproxy.objects.buttons.SiriObject.setAceId">
<tt class="descname">setAceId</tt><big>(</big><em>aceId=None</em><big>)</big><a class="headerlink" href="#pysiriproxy.objects.buttons.SiriObject.setAceId" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the ace id for this object.</p>
<ul class="simple">
<li>aceId &#8211; The aceId for this object</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pysiriproxy.objects.buttons.SiriObject.setNonNoneArguments">
<tt class="descname">setNonNoneArguments</tt><big>(</big><em>argumentNames</em>, <em>localVars</em><big>)</big><a class="headerlink" href="#pysiriproxy.objects.buttons.SiriObject.setNonNoneArguments" title="Permalink to this definition">¶</a></dt>
<dd><p>Takes a list of strings which represent names of input variables and
sets properties of the same name on the current object if the value of
the argument is not None.</p>
<ul class="simple">
<li>argumentNames &#8211; The list of argument names to set</li>
<li>localVars &#8211; The local variables</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pysiriproxy.objects.buttons.SiriObject.setRefId">
<tt class="descname">setRefId</tt><big>(</big><em>refId=None</em><big>)</big><a class="headerlink" href="#pysiriproxy.objects.buttons.SiriObject.setRefId" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the ref id for this object.</p>
<ul class="simple">
<li>refId &#8211; The refId for this object</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="pysiriproxy.objects.buttons.SiriObject.toDict">
<tt class="descname">toDict</tt><big>(</big><big>)</big><a class="headerlink" href="#pysiriproxy.objects.buttons.SiriObject.toDict" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert this object into a Python dictionary.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="the-actions-class">
<h2>The Actions class<a class="headerlink" href="#the-actions-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-d542d1ea107798011035f9e55f202f7bd7cd4d2c.png" alt="Inheritance diagram of pysiriproxy.objects.buttons.Actions" usemap="#inheritance989b3af411" class="inheritance"/>
<map id="inheritance989b3af411" name="inheritance989b3af411">
<area shape="rect" href="pysiriproxy_objects_actions.html#pysiriproxy.objects.actions.Actions" title="pysiriproxy.objects.actions.Actions" alt="" coords="5,7,243,33"/>
</map>
</p>
<dl class="class">
<dt id="pysiriproxy.objects.buttons.Actions">
<em class="property">class </em><tt class="descclassname">pysiriproxy.objects.buttons.</tt><tt class="descname">Actions</tt><a class="headerlink" href="#pysiriproxy.objects.buttons.Actions" title="Permalink to this definition">¶</a></dt>
<dd><p>The Actions class contains a list of Action types as well as a
function for creating specific types of Actions.</p>
<p>This class provides a factory function for creating Actions of a specific
type.</p>
<dl class="attribute">
<dt id="pysiriproxy.objects.buttons.Actions.CustomCommand">
<tt class="descname">CustomCommand</tt><a class="headerlink" href="#pysiriproxy.objects.buttons.Actions.CustomCommand" title="Permalink to this definition">¶</a></dt>
<dd><p>The CustomCommand action type.</p>
</dd></dl>

<dl class="attribute">
<dt id="pysiriproxy.objects.buttons.Actions.WebSearch">
<tt class="descname">WebSearch</tt><a class="headerlink" href="#pysiriproxy.objects.buttons.Actions.WebSearch" title="Permalink to this definition">¶</a></dt>
<dd><p>The WebSearch action type.</p>
</dd></dl>

<dl class="classmethod">
<dt id="pysiriproxy.objects.buttons.Actions.create">
<em class="property">classmethod </em><tt class="descname">create</tt><big>(</big><em>actionType</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#pysiriproxy.objects.buttons.Actions.create" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a specific Action wrapped in a SendCommands object so
it can be sent to Siri as a command.</p>
<ul class="simple">
<li>actionType &#8211; The type of Action to create</li>
<li>args &#8211; The arguments</li>
<li>kwargs &#8211; The keyword arguments</li>
</ul>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="the-buttons-class">
<h2>The Buttons class<a class="headerlink" href="#the-buttons-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-42c7e2f53bd0d3dd5c560f54f3249861e17e9905.png" alt="Inheritance diagram of pysiriproxy.objects.buttons.Buttons" usemap="#inheritance3682b58e27" class="inheritance"/>
<map id="inheritance3682b58e27" name="inheritance3682b58e27">
<area shape="rect" href="#pysiriproxy.objects.buttons.Buttons" title="pysiriproxy.objects.buttons.Buttons" alt="" coords="5,7,248,33"/>
</map>
</p>
<dl class="class">
<dt id="pysiriproxy.objects.buttons.Buttons">
<em class="property">class </em><tt class="descclassname">pysiriproxy.objects.buttons.</tt><tt class="descname">Buttons</tt><a class="reference internal" href="../_modules/pysiriproxy/objects/buttons.html#Buttons"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pysiriproxy.objects.buttons.Buttons" title="Permalink to this definition">¶</a></dt>
<dd><p>The Buttons class contains the various types of Buttons as well as
a function for creating Buttons of a specific type.</p>
<p>This class provides a factory function for creating Buttons of a specific
type.</p>
<dl class="attribute">
<dt id="pysiriproxy.objects.buttons.Buttons.Custom">
<tt class="descname">Custom</tt><a class="headerlink" href="#pysiriproxy.objects.buttons.Buttons.Custom" title="Permalink to this definition">¶</a></dt>
<dd><p>A button that executes a custom command when it is pressed.</p>
</dd></dl>

<dl class="attribute">
<dt id="pysiriproxy.objects.buttons.Buttons.WebSearch">
<tt class="descname">WebSearch</tt><a class="headerlink" href="#pysiriproxy.objects.buttons.Buttons.WebSearch" title="Permalink to this definition">¶</a></dt>
<dd><p>A button that performs a web search for a specific query when it is
pressed.</p>
</dd></dl>

<dl class="classmethod">
<dt id="pysiriproxy.objects.buttons.Buttons.create">
<em class="property">classmethod </em><tt class="descname">create</tt><big>(</big><em>buttonType</em>, <em>buttonText</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/pysiriproxy/objects/buttons.html#Buttons.create"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pysiriproxy.objects.buttons.Buttons.create" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a Button of the given type.</p>
<ul class="simple">
<li>buttonType &#8211; The type of Button to create</li>
<li>buttonText &#8211; The text displayed on the button</li>
<li>args &#8211; The arguments</li>
<li>kwargs &#8211; The keyword arguments</li>
</ul>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="the-button-class">
<h2>The _Button class<a class="headerlink" href="#the-button-class" title="Permalink to this headline">¶</a></h2>
<p class="graphviz">
<img src="../_images/inheritance-8c84dc85899ec62e412ff6823bf6e85af640255b.png" alt="Inheritance diagram of pysiriproxy.objects.buttons._Button" usemap="#inheritance995a23e8f9" class="inheritance"/>
<map id="inheritance995a23e8f9" name="inheritance995a23e8f9">
<area shape="rect" href="pysiriproxy_objects_baseObject.html#pysiriproxy.objects.baseObject.SiriObject" title="pysiriproxy.objects.baseObject.SiriObject" alt="" coords="5,7,283,33"/>
<area shape="rect" href="#pysiriproxy.objects.buttons._Button" title="pysiriproxy.objects.buttons._Button" alt="" coords="23,84,265,111"/>
</map>
</p>
<dl class="class">
<dt id="pysiriproxy.objects.buttons._Button">
<em class="property">class </em><tt class="descclassname">pysiriproxy.objects.buttons.</tt><tt class="descname">_Button</tt><big>(</big><em>buttonText</em>, <em>commands=None</em><big>)</big><a class="reference internal" href="../_modules/pysiriproxy/objects/buttons.html#_Button"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pysiriproxy.objects.buttons._Button" title="Permalink to this definition">¶</a></dt>
<dd><p>The _Button class encapsulates the base functionality for creating a
button on the iPhone Siri view.</p>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">The buttons module</a><ul>
<li><a class="reference internal" href="#the-custom-class">The _Custom class</a></li>
<li><a class="reference internal" href="#the-websearchbutton-class">The _WebSearchButton class</a></li>
<li><a class="reference internal" href="#the-siriobject-class">The SiriObject class</a></li>
<li><a class="reference internal" href="#the-actions-class">The Actions class</a></li>
<li><a class="reference internal" href="#the-buttons-class">The Buttons class</a></li>
<li><a class="reference internal" href="#the-button-class">The _Button class</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="pysiriproxy_objects_factory.html"
                        title="previous chapter">The factory module</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="pysiriproxy_objects_dataObjects.html"
                        title="next chapter">The dataObjects module</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/_generated/pysiriproxy_objects_buttons.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pysiriproxy_objects_dataObjects.html" title="The dataObjects module"
             >next</a> |</li>
        <li class="right" >
          <a href="pysiriproxy_objects_factory.html" title="The factory module"
             >previous</a> |</li>
        <li><a href="../index.html">pysiriproxy v0.0.7 documentation</a> &raquo;</li>
          <li><a href="mod_pysiriproxy.html" >The pysiriproxy module</a> &raquo;</li>
          <li><a href="mod_pysiriproxy_objects.html" >The objects module</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Brett Ponsler.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
    </div>
  </body>
</html>